package com.changli01.create.thread.exer1;

public class ThreadTest {
    public static void main(String[] args) {
//        Thread1 t1 = new Thread1();
//        Thread2 t2 = new Thread2();
//        t1.start();
//        t2.start();

        new Thread (){
            @Override
            public void run() {
                for (int i = 1; i <=100 ; i++) {
                    if((i&1) ==1 ){
                        System.out.println(Thread.currentThread().getName()+"->"+i);
                    }

                }
            }
        }.start();
        new Thread (){
            @Override
            public void run() {
                for (int i = 1; i <=100 ; i++) {
                    if((i&1) !=1 ){
                        System.out.println(Thread.currentThread().getName()+"->"+i);
                    }

                }
            }
        }.start();
    }

}
